<template>
	<view>
		<view class="dynamic">
			<view class="user__container">
				<view class="user__header-warp">
					<!-- 头像组 -->
					<view class="user__header" @tap.stop>
						<image class="user__header-image" :src="jtem.icon" mode="aspectFill"></image>
					</view>
				</view>
				<view class="user__content">
					<view class="user__content-main">
						<text class="user__content-title uni-ellipsis" @click.stop="clickUser()">{{jtem.name}}</text>
						<text class="user__content-note uni-ellipsis">{{jtem.createtime | datefmt('YYYY-MM-DD HH:mm:ss')}}</text>
					</view>
					<view class="user__content-extra">
						<!-- <u-icon name="more-dot-fill" @click.stop="clickDelete(item.id)" v-if="showdelete"></u-icon> -->
						<text>{{jtem.content}}</text>
					</view>
				</view>
			</view>
			<view class="operate box box-pack-end">
                <!--通过按钮-->
				<view class="operate-wap">
					<view class="operate-text">
					   <u-button type="success" @click="clickadop(jtem.id)" :custom-style="btnstyle" plain>通过</u-button>
					   <u-toast ref="uToast" />
					</view>
				</view>
				<!--驳回按钮-->
				<view class="operate-wap">
					<view class="operate-text" style="padding-left:8upx;">
					   <u-button type="error" @click="clickbo(jtem.id)" :custom-style="btnstyle" plain>驳回</u-button>
					</view>
				</view>
			</view>
	    </view>
    </view>
</template>

<script>
	export default {
		props:{
			jtem:{
				type:Object
			},
		},
			data() {
				return {
					// src: 'https://cdn.uviewui.com/uview/example/fade.jpg',
					btnstyle:{
						width: '112rpx',
						height: '62rpx',
						fontSize:'24rpx',
					     border:'none'
					},
					// user: uni.getStorageSync('user'),
					// page:1,
					// pageNum:null
			    }
		    },
			mounted() {
				// this.getdata()
			},
			// onReachBottom(){
			//    if(this.page<this.pageNum){
			// 	   this.page++;
			// 	   this.getdata();
			//    }
			// },
			methods:{
			// 	getdata(){
			// 		//数据接口
			// 		this.$api.post({url:'/ytodo/pagelist'},{userid:this.user.id,page:this.page,pageSize:10}).then(res=>{
			// 			//console.log(res)
			// 			if(res.code==0){
			// 				this.pageNum=res.page.pages;
			// 			}
			// 		    // this.tablist[2].cate_count=this.listj.length;//将数据的未读数量引入给徽标数
			// 	    })
			// 	},
			    clickadop(id){
					//console.log(id)
					this.$emit('clickadop',id)
				},
				clickbo(id){
					//console.log(id)
					this.$emit('clickbo',id)
				}
			}
	}
</script>

<style scoped lang="scss">
	
		.u-update-content {
			font-size: 26rpx;
			color: $u-content-color;
			line-height: 1.7;
			padding: 30rpx;
		}
	.operate {
		width: 100%;
	}
	
	.operate-wap {
		display: inline-block;
		width: 116rpx;
		margin: 0 18rpx;
		padding-bottom: 0;
		position: relative;
	}	
	.imgstyle{
		width: 82rpx;
		height: 82rpx;
	}
	.operate-text {
		font-size: 18rpx;
		width: 112rpx;
		height: 52rpx;
		display: inline-block;
		position: absolute;
		margin-left: 8upx;
	}
	.dynamic {
		width: 96%;
		font-size: 30upx;
		background-color: white;
		padding-bottom:15%;
		border-bottom: 1px solid #E5E5E5;
	}
	.user__container {
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		/* -webkit-flex-direction: row; */
		flex-direction: row;
		-webkit-box-flex: 1;
		/* -webkit-flex: 1; */
		flex: 1;
		padding: 14upx 18upx;
		position: relative;
		overflow: hidden;
	}
	.user__header {
		display: flex;
		width: 80upx;
		height: 80upx;
		-webkit-border-radius: 20upx;
		border-color: #eee;
		border-width: 1upx;
		border-style: solid;
		overflow: hidden;
		border-radius: 20upx;
	}
	.user__header-image {
		display: flex;
		align-content: center;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		flex-direction: row;
		-webkit-box-pack: center;
		justify-content: center;
		-webkit-box-align: center;
		align-items: center;
		flex-wrap: wrap-reverse;
		width: 80upx;
		height: 80upx;
		border-radius: 20upx;
		border-color: #eee;
		border-width: 1upx;
		border-style: solid;
		overflow: hidden;
	}
	.user__content {
		display: flex;
		-webkit-box-orient: horizontal;
		-webkit-box-direction: normal;
		flex-direction: column;
		-webkit-box-flex: 1;
		flex: 1;
		overflow: hidden;
		padding: 4upx 0;

	}
	
	.user__content-main {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-webkit-flex-direction: column;
		flex-direction: column;
		-webkit-box-pack: justify;
		-webkit-justify-content: space-between;
		justify-content: space-between;
		padding-left: 14upx;
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		overflow: hidden;
		margin-bottom: 20rpx;
	}
	
	.user__content-note {
		margin-top: 3px;
		color: #999;
		font-size: 24upx;
		font-weight: normal;
		overflow: hidden;
	}
</style>

